<?php
/*
 * [佳喜网络!] (C)2008-2009 JiaXi Inc.
 * $Id: include.php 2008-8-13 19:28:02 pepsi.zh $
 * -------------------------------------------
 * 网址：www.he88.cn
 * -------------------------------------------
 * 这是一个共享软件，遵循我们公司的共享协议。
*/
include_once('include/include.php');
$outvar[contenttitle] = '添加网页';
c_create::createClass('site');
$site = new site();
c_create::createClass('web');
$web = new web();

if ($_POST){
	$_POST[userId] = $_SESSION[userId];
	if ($web->addRecord($_POST)){
		$_SESSION[showtip] = '推荐网页添加成功！';
		header('location:web_list.php');
		exit;
	}else {
		$_SESSION[showtip] = $web->action.'失败';
	}
	$outvar = addArray($outvar,$web->error);
}elseif ($_GET[id]){
	$_POST = $web->getOneRecord($_GET[id],TRUE,$_SESSION[userId]);
}

if($_POST){
	$outvar = addArray($outvar,$_POST);
}
if ($_POST[zsiteid]){
	$outvar[contenttitle] = '修改网页';
}

$outvar[ztypelist] = $ArticleType;
if (empty($outvar[ztypeid])){
	$outvar[ztypeid] = 1023;
}
$outvar[sitelist] = $site->getRecord($_SESSION[userId],false,true);
if (count($outvar[sitelist]) < $_SESSION[siteNum]){
	$outvar[addsiteA] = true;
}else{
	$outvar[addsiteA] = false;
}

setnavi(3);
$outvar[includeT] = 'member/web_add';
outFile('member/main');
?>